this.smartcardDetected = this._userVerifier.smartcardDetected;
this.connect('next', () => {
- this.updateSensitivity(false);
- this.startSpinning();
- if (this._queryingService) {
- this._userVerifier.answerQuery(this._queryingService, this._entry.text);
- } else {
- this._preemptiveAnswer = this._entry.text;
- }
- });
+ this.updateSensitivity(false);
+ this.startSpinning();
+ if (this._queryingService) {
+ this._userVerifier.answerQuery(this._queryingService, this._entry.text);
+ } else {
+ this._preemptiveAnswer = this._entry.text;
+ }
+ });
this.actor = new St.BoxLayout({ style_class: 'login-dialog-prompt-layout',
vertical: true });
this.actor.connect('destroy', this._onDestroy.bind(this));
this.actor.connect('key-press-event', (actor, event) => {
- if (event.get_key_symbol() == Clutter.KEY_Escape)
- this.cancel();
- return Clutter.EVENT_PROPAGATE;
- });
+ if (event.get_key_symbol() == Clutter.KEY_Escape)
+ this.cancel();
+ return Clutter.EVENT_PROPAGATE;
+ });
this._userWell = new St.Bin({ x_fill: true,
x_align: St.Align.START });
delay: DEFAULT_BUTTON_WELL_ANIMATION_DELAY,
transition: 'linear',
onComplete: () => {
- if (wasSpinner) {
- if (this._spinner)
- this._spinner.stop();
- }
+ if (wasSpinner) {
+ if (this._spinner)
+ this._spinner.stop();
+ }
}
});
}
var ConcurrentBatch = class extends Batch {
process() {
- let hold = this.runTask();
+ let hold = this.runTask();
- if (hold) {
- this.hold.acquireUntilAfter(hold);
- }
+ if (hold) {
+ this.hold.acquireUntilAfter(hold);
+ }
- // Regardless of the state of the just run task,
- // fire off the next one, so all the tasks can run
- // concurrently.
- this.nextTask();
+ // Regardless of the state of the just run task,
+ // fire off the next one, so all the tasks can run
+ // concurrently.
+ this.nextTask();
}
};
Signals.addSignalMethods(ConcurrentBatch.prototype);
var ConsecutiveBatch = class extends Batch {
process() {
- let hold = this.runTask();
-
- if (hold && hold.isAcquired()) {
- // This task is inhibiting the batch. Wait on it
- // before processing the next one.
- let signalId = hold.connect('release', () => {
- hold.disconnect(signalId);
- this.nextTask();
- });
- return;
- } else {
- // This task finished, process the next one
- this.nextTask();
- }
+ let hold = this.runTask();
+
+ if (hold && hold.isAcquired()) {
+ // This task is inhibiting the batch. Wait on it
+ // before processing the next one.
+ let signalId = hold.connect('release', () => {
+ hold.disconnect(signalId);
+ this.nextTask();
+ });
+ return;
+ } else {
+ // This task finished, process the next one
+ this.nextTask();
+ }
}
};
Signals.addSignalMethods(ConsecutiveBatch.prototype);
constructor(user) {
this.user = user;
this._userChangedId = this.user.connect('changed',
- this._onUserChanged.bind(this));
+ this._onUserChanged.bind(this));
let layout = new St.BoxLayout({ vertical: true });
this.actor = new St.Button({ style_class: 'login-dialog-user-list-item',
return;
if (user.locked)
- return;
+ return;
let userName = user.get_user_name();
this._menu.actor.hide();
this._menu.connect('open-state-changed', (menu, isOpen) => {
- if (isOpen)
- this._button.add_style_pseudo_class('active');
- else
- this._button.remove_style_pseudo_class('active');
+ if (isOpen)
+ this._button.add_style_pseudo_class('active');
+ else
+ this._button.remove_style_pseudo_class('active');
});
this._manager = new PopupMenu.PopupMenuManager(this._button,
}
setActiveSession(sessionId) {
- if (sessionId == this._activeSessionId)
- return;
+ if (sessionId == this._activeSessionId)
+ return;
- this._activeSessionId = sessionId;
- this._updateOrnament();
+ this._activeSessionId = sessionId;
+ this._updateOrnament();
}
close() {
let leftOverYSpace = bannerSpace - bannerHeight;
if (leftOverYSpace > 0) {
- // First figure out how much left over space is up top
- let leftOverTopSpace = leftOverYSpace / 2;
+ // First figure out how much left over space is up top
+ let leftOverTopSpace = leftOverYSpace / 2;
- // Then, shift the banner into the middle of that extra space
- let yShift = Math.floor(leftOverTopSpace / 2);
+ // Then, shift the banner into the middle of that extra space
+ let yShift = Math.floor(leftOverTopSpace / 2);
- bannerAllocation.y1 += yShift;
- bannerAllocation.y2 += yShift;
+ bannerAllocation.y1 += yShift;
+ bannerAllocation.y2 += yShift;
} else {
- // Then figure out how much space there would be if we switched to a
- // wide layout with banner on one side and authprompt on the other.
- let leftOverXSpace = dialogWidth - authPromptWidth;
-
- // In a wide view, half of the available space goes to the banner,
- // and the other half goes to the margins.
- let wideBannerWidth = leftOverXSpace / 2;
- let wideSpacing = leftOverXSpace - wideBannerWidth;
-
- // If we do go with a wide layout, we need there to be at least enough
- // space for the banner and the auth prompt to be the same width,
- // so it doesn't look unbalanced.
- if (authPromptWidth > 0 && wideBannerWidth > authPromptWidth) {
- let centerX = dialogBox.x1 + dialogWidth / 2;
- let centerY = dialogBox.y1 + dialogHeight / 2;
-
- // A small portion of the spacing goes down the center of the
- // screen to help delimit the two columns of the wide view
- let centerGap = wideSpacing / 8;
-
- // place the banner along the left edge of the center margin
- bannerAllocation.x2 = Math.floor(centerX - centerGap / 2);
- bannerAllocation.x1 = Math.floor(bannerAllocation.x2 - wideBannerWidth);
-
- // figure out how tall it would like to be and try to accommodate
- // but don't let it get too close to the logo
- let [wideMinHeight, wideBannerHeight] = this._bannerView.get_preferred_height(wideBannerWidth);
-
- let maxWideHeight = dialogHeight - 3 * logoHeight;
- wideBannerHeight = Math.min(maxWideHeight, wideBannerHeight);
- bannerAllocation.y1 = Math.floor(centerY - wideBannerHeight / 2);
- bannerAllocation.y2 = bannerAllocation.y1 + wideBannerHeight;
-
- // place the auth prompt along the right edge of the center margin
- authPromptAllocation.x1 = Math.floor(centerX + centerGap / 2);
- authPromptAllocation.x2 = authPromptAllocation.x1 + authPromptWidth;
- } else {
- // If we aren't going to do a wide view, then we need to limit
- // the height of the banner so it will present scrollbars
-
- // First figure out how much space there is without the banner
- leftOverYSpace += bannerHeight;
-
- // Then figure out how much of that space is up top
- let availableTopSpace = Math.floor(leftOverYSpace / 2);
-
- // Then give all of that space to the banner
- bannerAllocation.y2 = bannerAllocation.y1 + availableTopSpace;
- }
+ // Then figure out how much space there would be if we switched to a
+ // wide layout with banner on one side and authprompt on the other.
+ let leftOverXSpace = dialogWidth - authPromptWidth;
+
+ // In a wide view, half of the available space goes to the banner,
+ // and the other half goes to the margins.
+ let wideBannerWidth = leftOverXSpace / 2;
+ let wideSpacing = leftOverXSpace - wideBannerWidth;
+
+ // If we do go with a wide layout, we need there to be at least enough
+ // space for the banner and the auth prompt to be the same width,
+ // so it doesn't look unbalanced.
+ if (authPromptWidth > 0 && wideBannerWidth > authPromptWidth) {
+ let centerX = dialogBox.x1 + dialogWidth / 2;
+ let centerY = dialogBox.y1 + dialogHeight / 2;
+
+ // A small portion of the spacing goes down the center of the
+ // screen to help delimit the two columns of the wide view
+ let centerGap = wideSpacing / 8;
+
+ // place the banner along the left edge of the center margin
+ bannerAllocation.x2 = Math.floor(centerX - centerGap / 2);
+ bannerAllocation.x1 = Math.floor(bannerAllocation.x2 - wideBannerWidth);
+
+ // figure out how tall it would like to be and try to accommodate
+ // but don't let it get too close to the logo
+ let [wideMinHeight, wideBannerHeight] = this._bannerView.get_preferred_height(wideBannerWidth);
+
+ let maxWideHeight = dialogHeight - 3 * logoHeight;
+ wideBannerHeight = Math.min(maxWideHeight, wideBannerHeight);
+ bannerAllocation.y1 = Math.floor(centerY - wideBannerHeight / 2);
+ bannerAllocation.y2 = bannerAllocation.y1 + wideBannerHeight;
+
+ // place the auth prompt along the right edge of the center margin
+ authPromptAllocation.x1 = Math.floor(centerX + centerGap / 2);
+ authPromptAllocation.x2 = authPromptAllocation.x1 + authPromptWidth;
+ } else {
+ // If we aren't going to do a wide view, then we need to limit
+ // the height of the banner so it will present scrollbars
+
+ // First figure out how much space there is without the banner
+ leftOverYSpace += bannerHeight;
+
+ // Then figure out how much of that space is up top
+ let availableTopSpace = Math.floor(leftOverYSpace / 2);
+
+ // Then give all of that space to the banner
+ bannerAllocation.y2 = bannerAllocation.y1 + availableTopSpace;
+ }
}
} else if (userSelectionAllocation) {
// Grow the user list to fill the space
_shouldShowSessionMenuButton() {
if (this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.VERIFYING &&
this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.VERIFICATION_FAILED)
- return false;
+ return false;
if (this._user && this._user.is_loaded && this._user.is_logged_in())
- return false;
+ return false;
return true;
}
let item = this._userList.getItemFromUserName(userName);
if (item)
- return null;
+ return null;
let hold = new Batch.Hold();
let signalId = this._userList.connect('item-added',
// Restart timed login on user interaction
global.stage.connect('captured-event', (actor, event) => {
- if (event.type() == Clutter.EventType.KEY_PRESS ||
+ if (event.type() == Clutter.EventType.KEY_PRESS ||
event.type() == Clutter.EventType.BUTTON_PRESS) {
- this._startTimedLogin(userName, seconds);
- }
+ this._startTimedLogin(userName, seconds);
+ }
- return Clutter.EVENT_PROPAGATE;
+ return Clutter.EVENT_PROPAGATE;
});
}
_startService(serviceName) {
this._hold.acquire();
if (this._userName) {
- this._userVerifier.call_begin_verification_for_user(serviceName,
- this._userName,
- this._cancellable,
- (obj, result) => {
- try {
- obj.call_begin_verification_for_user_finish(result);
- } catch (e) {
- if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
- return;
- this._reportInitError('Failed to start verification for user', e);
- return;
- }
-
- this._hold.release();
- });
+ this._userVerifier.call_begin_verification_for_user(serviceName, this._userName, this._cancellable, (obj, result) => {
+ try {
+ obj.call_begin_verification_for_user_finish(result);
+ } catch (e) {
+ if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
+ return;
+ this._reportInitError('Failed to start verification for user', e);
+ return;
+ }
+
+ this._hold.release();
+ });
} else {
- this._userVerifier.call_begin_verification(serviceName,
- this._cancellable,
- (obj, result) => {
- try {
- obj.call_begin_verification_finish(result);
- } catch (e) {
- if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
- return;
- this._reportInitError('Failed to start verification', e);
- return;
- }
-
- this._hold.release();
- });
+ this._userVerifier.call_begin_verification(serviceName, this._cancellable, (obj, result) => {
+ try {
+ obj.call_begin_verification_finish(result);
+ } catch (e) {
+ if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
+ return;
+ this._reportInitError('Failed to start verification', e);
+ return;
+ }
+
+ this._hold.release();
+ });
}
}
}
_isIntrospectEnabled() {
- return this._settings.get_boolean(INTROSPECT_KEY);
+ return this._settings.get_boolean(INTROSPECT_KEY);
}
_isSenderWhitelisted(sender) {
- return APP_WHITELIST.includes(sender);
+ return APP_WHITELIST.includes(sender);
}
_getSandboxedAppId(app) {
let obj = {};
if (!isUnsafeExpression(expr)) {
try {
- obj = eval(commandHeader + expr);
+ obj = eval(commandHeader + expr);
} catch (e) {
return [];
}
let info = this._interfaceInfos[interfaceName];
if (!info) {
- if (onFinished)
- onFinished();
- return;
+ if (onFinished)
+ onFinished();
+ return;
}
let proxy = new Gio.DBusProxy({ g_connection: this._connection,
- g_name: this._serviceName,
- g_object_path: objectPath,
- g_interface_name: interfaceName,
- g_interface_info: info,
- g_flags: Gio.DBusProxyFlags.DO_NOT_AUTO_START });
-
- proxy.init_async(GLib.PRIORITY_DEFAULT,
- this._cancellable,
- (initable, result) => {
- try {
- initable.init_finish(result);
- } catch (e) {
- logError(e, 'could not initialize proxy for interface ' + interfaceName);
-
- if (onFinished)
- onFinished();
- return;
- }
-
- let isNewObject;
- if (!this._objects[objectPath]) {
- this._objects[objectPath] = {};
- isNewObject = true;
- } else {
- isNewObject = false;
- }
-
- this._objects[objectPath][interfaceName] = proxy;
-
- if (!this._interfaces[interfaceName])
- this._interfaces[interfaceName] = [];
-
- this._interfaces[interfaceName].push(proxy);
-
- if (isNewObject)
- this.emit('object-added', objectPath);
-
- this.emit('interface-added', interfaceName, proxy);
-
- if (onFinished)
- onFinished();
+ g_name: this._serviceName,
+ g_object_path: objectPath,
+ g_interface_name: interfaceName,
+ g_interface_info: info,
+ g_flags: Gio.DBusProxyFlags.DO_NOT_AUTO_START });
+
+ proxy.init_async(GLib.PRIORITY_DEFAULT, this._cancellable, (initable, result) => {
+ try {
+ initable.init_finish(result);
+ } catch (e) {
+ logError(e, 'could not initialize proxy for interface ' + interfaceName);
+
+ if (onFinished)
+ onFinished();
+ return;
+ }
+
+ let isNewObject;
+ if (!this._objects[objectPath]) {
+ this._objects[objectPath] = {};
+ isNewObject = true;
+ } else {
+ isNewObject = false;
+ }
+
+ this._objects[objectPath][interfaceName] = proxy;
+
+ if (!this._interfaces[interfaceName])
+ this._interfaces[interfaceName] = [];
+
+ this._interfaces[interfaceName].push(proxy);
+
+ if (isNewObject)
+ this.emit('object-added', objectPath);
+
+ this.emit('interface-added', interfaceName, proxy);
+
+ if (onFinished)
+ onFinished();
});
}
this._managerProxy.GetManagedObjectsRemote((result, error) => {
if (!result) {
if (error) {
- logError(error, 'could not get remote objects for service ' + this._serviceName + ' path ' + this._managerPath);
+ logError(error, 'could not get remote objects for service ' + this._serviceName + ' path ' + this._managerPath);
}
this._tryToCompleteLoad();
this.forceUpdate();
this._orientationSettings.connect('changed::orientation-lock',
- () => { this._updateOrientationLock();
- this._updateOrientationLockIcon(); });
+ () => {
+ this._updateOrientationLock();
+ this._updateOrientationLockIcon();
+ });
Main.layoutManager.connect('monitors-changed',
() => { this._updateOrientationLock(); });
Gio.DBus.system.watch_name(SENSOR_BUS_NAME,
_setIconSize() {
let j = 0;
while (this._items.length > 1 && this._items[j].style_class != 'item-box') {
- j++;
+ j++;
}
let themeNode = this._items[j].get_theme_node();
this._list.ensure_style();
});
GLib.Source.set_name_by_id(this._mouseTimeOutId, '[gnome-shell] this._enterItem');
} else {
- this._itemEntered(index);
+ this._itemEntered(index);
}
}
transition: 'easeOutQuad',
opacity: 0,
onComplete() {
- this.opacity = 255;
+ this.opacity = 255;
} });
if (animationDirection == IconGrid.AnimationDirection.OUT)
}
_onPanEnd(action) {
- if (this._displayingPopup)
+ if (this._displayingPopup)
return;
let pageHeight = this._grid.getPageHeight();
let maxMinWidth = 0;
let maxNaturalWidth = 0;
for (let child = container.get_first_child();
- child;
- child = child.get_next_sibling()) {
- let [minWidth, natWidth] = child.get_preferred_width(forHeight);
- maxMinWidth = Math.max(maxMinWidth, minWidth);
- maxNaturalWidth = Math.max(maxNaturalWidth, natWidth);
+ child;
+ child = child.get_next_sibling()) {
+ let [minWidth, natWidth] = child.get_preferred_width(forHeight);
+ maxMinWidth = Math.max(maxMinWidth, minWidth);
+ maxNaturalWidth = Math.max(maxNaturalWidth, natWidth);
}
let childrenCount = container.get_n_children();
let totalSpacing = this.spacing * (childrenCount - 1);
// shown next, so make sure to restore their opacity
// when they are hidden
if (this._controls.mapped)
- return;
+ return;
Tweener.removeTweens(this._controls);
this._controls.opacity = 255;
{ time: IconGrid.ANIMATION_TIME_IN,
transition: 'easeInOutQuad',
opacity: finalOpacity,
- });
+ });
currentView.animate(animationDirection, onComplete);
}
'name': app.get_name(),
'createIcon'(size) {
return app.create_icon_texture(size);
- }
+ }
});
} else {
let name = this._systemActions.getName(id);
this._boxPointer.open(BoxPointer.PopupAnimation.FADE |
BoxPointer.PopupAnimation.SLIDE,
() => {
- this._view.actor.opacity = 255;
- this._view.animate(IconGrid.AnimationDirection.IN);
- });
+ this._view.actor.opacity = 255;
+ this._view.animate(IconGrid.AnimationDirection.IN);
+ });
this.emit('open-state-changed', true);
}
Main.overview.cancelledItemDrag(this);
});
this._draggable.connect('drag-end', () => {
- Main.overview.endItemDrag(this);
+ Main.overview.endItemDrag(this);
});
}
return;
this._updateAnimationTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
- interval,
- () => {
- this._updateAnimationTimeoutId = 0;
- this._updateAnimation();
- return GLib.SOURCE_REMOVE;
- });
+ interval,
+ () => {
+ this._updateAnimationTimeoutId = 0;
+ this._updateAnimation();
+ return GLib.SOURCE_REMOVE;
+ });
GLib.Source.set_name_by_id(this._updateAnimationTimeoutId, '[gnome-shell] this._updateAnimation');
}
cr.lineTo(x, (height + barLevelHeight) / 2);
cr.lineTo(barLevelBorderRadius + barLevelBorderWidth, (height + barLevelHeight) / 2);
if (this._value > 0)
- Clutter.cairo_set_source_color(cr, barLevelActiveColor);
+ Clutter.cairo_set_source_color(cr, barLevelActiveColor);
cr.fillPreserve();
Clutter.cairo_set_source_color(cr, barLevelActiveBorderColor);
cr.setLineWidth(barLevelBorderWidth);
/* end progress bar arc */
if (this._value > 0) {
- if (this._value <= this._overdriveStart)
- Clutter.cairo_set_source_color(cr, barLevelActiveColor);
- else
- Clutter.cairo_set_source_color(cr, barLevelOverdriveColor);
- cr.arc(endX, height / 2, barLevelBorderRadius, TAU * (3 / 4), TAU * (1 / 4));
- cr.lineTo(Math.floor(endX), (height + barLevelHeight) / 2);
- cr.lineTo(Math.floor(endX), (height - barLevelHeight) / 2);
- cr.lineTo(endX, (height - barLevelHeight) / 2);
- cr.fillPreserve();
- cr.setLineWidth(barLevelBorderWidth);
- cr.stroke();
+ if (this._value <= this._overdriveStart)
+ Clutter.cairo_set_source_color(cr, barLevelActiveColor);
+ else
+ Clutter.cairo_set_source_color(cr, barLevelOverdriveColor);
+ cr.arc(endX, height / 2, barLevelBorderRadius, TAU * (3 / 4), TAU * (1 / 4));
+ cr.lineTo(Math.floor(endX), (height + barLevelHeight) / 2);
+ cr.lineTo(Math.floor(endX), (height - barLevelHeight) / 2);
+ cr.lineTo(endX, (height - barLevelHeight) / 2);
+ cr.fillPreserve();
+ cr.setLineWidth(barLevelBorderWidth);
+ cr.stroke();
}
/* draw overdrive separator */
// we force stop/eject in this case, so we don't have to pass a
// mount operation object
if (drive.can_stop()) {
- drive.stop
- (Gio.MountUnmountFlags.FORCE, null, null,
- (drive, res) => {
- try {
- drive.stop_finish(res);
- } catch (e) {
- log("Unable to stop the drive after drive-eject-button " + e.toString());
- }
- });
+ drive.stop(Gio.MountUnmountFlags.FORCE, null, null,
+ (drive, res) => {
+ try {
+ drive.stop_finish(res);
+ } catch (e) {
+ log("Unable to stop the drive after drive-eject-button " + e.toString());
+ }
+ });
} else if (drive.can_eject()) {
- drive.eject_with_operation
- (Gio.MountUnmountFlags.FORCE, null, null,
- (drive, res) => {
- try {
- drive.eject_with_operation_finish(res);
- } catch (e) {
- log("Unable to eject the drive after drive-eject-button " + e.toString());
- }
- });
+ drive.eject_with_operation(Gio.MountUnmountFlags.FORCE, null, null,
+ (drive, res) => {
+ try {
+ drive.eject_with_operation_finish(res);
+ } catch (e) {
+ log("Unable to eject the drive after drive-eject-button " + e.toString());
+ }
+ });
}
}
// NOTE: ModalDialog.open() is safe to call if the dialog is
// already open - it just returns true without side-effects
if (this.open())
- return true;
+ return true;
// The above fail if e.g. unable to get input grab
//
let connectionSetting = connection.get_setting_connection();
let argv = [authHelper.fileName,
- '-u', connectionSetting.uuid,
- '-n', connectionSetting.id,
- '-s', serviceType
- ];
+ '-u', connectionSetting.uuid,
+ '-n', connectionSetting.id,
+ '-s', serviceType];
if (authHelper.externalUIMode)
argv.push('--external-ui-mode');
if (flags & NM.SecretAgentGetSecretsFlags.ALLOW_INTERACTION)
let [targetHandle, targetHandleType] = channel.get_handle();
if (channel.get_invalidated())
- continue;
+ continue;
/* Only observe contact text channels */
if ((!(channel instanceof Tp.TextChannel)) ||
targetHandleType != Tp.HandleType.CONTACT)
- continue;
+ continue;
this._createChatSource(account, conn, channel, channel.get_target_contact());
}
}
if (channel.get_invalidated())
- continue;
+ continue;
// 'notify' will be true when coming from an actual HandleChannels
// call, and not when from a successful Claim call. The point is
// keep track of it with the ChatStateChanged signal but it is good
// enough right now.
if (state != this._chatState) {
- this._chatState = state;
- this._channel.set_chat_state_async(state, null);
+ this._chatState = state;
+ this._channel.set_chat_state_async(state, null);
}
}
toggle_mode: true });
this._iconActor = null;
this.icon = new IconGrid.BaseIcon(_("Show Applications"),
- { setSizeManually: true,
- showLabel: false,
- createIcon: this._createIcon.bind(this) });
+ { setSizeManually: true,
+ showLabel: false,
+ createIcon: this._createIcon.bind(this) });
this.toggleButton.add_actor(this.icon);
this.toggleButton._delegate = this;
let running = this._appSystem.get_running();
let children = this._box.get_children().filter(actor => {
- return actor.child &&
- actor.child._delegate &&
- actor.child._delegate.app;
- });
+ return actor.child &&
+ actor.child._delegate &&
+ actor.child._delegate.app;
+ });
// Apps currently in the dash
let oldApps = children.map(actor => actor.child._delegate.app);
// Apps supposed to be in the dash
});
let box = new St.BoxLayout({ style_class: 'weather-box',
- vertical: true });
+ vertical: true });
this.actor.child = box;
};
const DialogType = {
- LOGOUT: 0 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_LOGOUT */,
- SHUTDOWN: 1 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_SHUTDOWN */,
- RESTART: 2 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_RESTART */,
- UPDATE_RESTART: 3,
- UPGRADE_RESTART: 4
+ LOGOUT: 0 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_LOGOUT */,
+ SHUTDOWN: 1 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_SHUTDOWN */,
+ RESTART: 2 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_RESTART */,
+ UPDATE_RESTART: 3,
+ UPGRADE_RESTART: 4
};
const DialogContent = {
let indexes = [];
let indexLabel;
for (let i = 0; (indexLabel = lookupTable.get_label(i)); ++i)
- indexes.push(indexLabel.get_text());
+ indexes.push(indexLabel.get_text());
Main.keyboard.resetSuggestions();
return true;
for (let child = this.get_first_child();
- child != null;
- child = child.get_next_sibling()) {
+ child != null;
+ child = child.get_next_sibling()) {
if (!child.visible || !child.opacity)
continue;
let bounceUpTime = ANIMATION_TIME_IN / 4;
let isLastItem = index == actors.length - 1;
Tweener.addTween(actor,
- { time: bounceUpTime,
- transition: 'easeInOutQuad',
- delay: delay,
- scale_x: ANIMATION_BOUNCE_ICON_SCALE,
- scale_y: ANIMATION_BOUNCE_ICON_SCALE,
- onComplete: () => {
- Tweener.addTween(actor,
- { time: ANIMATION_TIME_IN - bounceUpTime,
- transition: 'easeInOutQuad',
- scale_x: 1,
- scale_y: 1,
- onComplete: () => {
- if (isLastItem)
- this._animationDone();
- }
- });
- }
- });
+ { time: bounceUpTime,
+ transition: 'easeInOutQuad',
+ delay: delay,
+ scale_x: ANIMATION_BOUNCE_ICON_SCALE,
+ scale_y: ANIMATION_BOUNCE_ICON_SCALE,
+ onComplete: () => {
+ Tweener.addTween(actor,
+ { time: ANIMATION_TIME_IN - bounceUpTime,
+ transition: 'easeInOutQuad',
+ scale_x: 1,
+ scale_y: 1,
+ onComplete: () => {
+ if (isLastItem)
+ this._animationDone();
+ }
+ });
+ }
+ });
}
}
}
vfunc_allocate(box, flags) {
- if (this._childrenPerPage == 0)
+ if (this._childrenPerPage == 0)
log('computePages() must be called before allocate(); pagination will not work.');
this.set_allocation(box, flags);
const defaultKeysPost = [
[[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }],
- [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
- [{ width: 3, level: 1, right: true, extraClassName: 'shift-key-lowercase' }],
- [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]],
+ [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
+ [{ width: 3, level: 1, right: true, extraClassName: 'shift-key-lowercase' }],
+ [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]],
[[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }],
- [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
- [{ width: 3, level: 0, right: true, extraClassName: 'shift-key-uppercase' }],
- [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]],
+ [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
+ [{ width: 3, level: 0, right: true, extraClassName: 'shift-key-uppercase' }],
+ [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]],
[[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }],
- [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
- [{ label: '=/<', width: 3, level: 3, right: true }],
- [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]],
+ [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
+ [{ label: '=/<', width: 3, level: 3, right: true }],
+ [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]],
[[{ label: '⌫', width: 1.5, keyval: Clutter.KEY_BackSpace }],
- [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
- [{ label: '?123', width: 3, level: 2, right: true }],
- [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]],
+ [{ width: 2, keyval: Clutter.KEY_Return, extraClassName: 'enter-key' }],
+ [{ label: '?123', width: 3, level: 2, right: true }],
+ [{ label: '☻', action: 'emoji' }, { action: 'languageMenu', extraClassName: 'layout-key' }, { action: 'hide', extraClassName: 'hide-key' }]],
];
var AspectContainer = GObject.registerClass(
}
if (!this._showIdleId) {
- this._showIdleId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
- this.show(Main.layoutManager.focusIndex);
- this._showIdleId = 0;
- return GLib.SOURCE_REMOVE;
- });
- GLib.Source.set_name_by_id(this._showIdleId, '[gnome-shell] this.show');
+ this._showIdleId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
+ this.show(Main.layoutManager.focusIndex);
+ this._showIdleId = 0;
+ return GLib.SOURCE_REMOVE;
+ });
+ GLib.Source.set_name_by_id(this._showIdleId, '[gnome-shell] this.show');
}
}
this.actor = new St.BoxLayout({ vertical: true,
name: 'lookingGlassExtensions' });
this._noExtensions = new St.Label({ style_class: 'lg-extensions-none',
- text: _("No extensions installed") });
+ text: _("No extensions installed") });
this._numExtensions = 0;
this._extensionsList = new St.BoxLayout({ vertical: true,
style_class: 'lg-extensions-list' });
_createExtensionDisplay(extension) {
let box = new St.BoxLayout({ style_class: 'lg-extension', vertical: true });
let name = new St.Label({ style_class: 'lg-extension-name',
- text: extension.metadata.name });
+ text: extension.metadata.name });
box.add(name, { expand: true });
let description = new St.Label({ style_class: 'lg-extension-description',
text: extension.metadata.description || 'No description' });
toolbar.add_actor(gcIcon);
gcIcon.reactive = true;
gcIcon.connect('button-press-event', () => {
- gcIcon.icon_name = 'user-trash';
- System.gc();
- this._timeoutId = Mainloop.timeout_add(500, () => {
+ gcIcon.icon_name = 'user-trash';
+ System.gc();
+ this._timeoutId = Mainloop.timeout_add(500, () => {
gcIcon.icon_name = 'user-trash-full';
this._timeoutId = 0;
return GLib.SOURCE_REMOVE;
- });
- GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] gcIcon.icon_name = \'user-trash-full\'');
- return Clutter.EVENT_PROPAGATE;
+ });
+ GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] gcIcon.icon_name = \'user-trash-full\'');
+ return Clutter.EVENT_PROPAGATE;
});
let notebook = new Notebook();
* Get whether the crosshairs are clipped by the mouse image.
* @return: Whether the crosshairs are clipped.
*/
- getCrosshairsClip() {
+ getCrosshairsClip() {
if (this._crossHairs) {
let [clipWidth, clipHeight] = this._crossHairs.getClip();
return (clipWidth > 0 && clipHeight > 0);
} else {
return false;
}
- }
+ }
//// Private methods ////
let showCrosshairs = this._settings.get_boolean(SHOW_CROSS_HAIRS_KEY);
this.addCrosshairs();
this.setCrosshairsVisible(showCrosshairs);
- }
+ }
_updateScreenPosition() {
// Applies only to the first zoom region.
this.reCenter();
}
- /**
+ /**
* addToZoomRegion
* Either add the crosshairs actor to the given ZoomRegion, or, if it is
* already part of some other ZoomRegion, create a clone of the crosshairs
this._clipSize = [0, 0];
this.reCenter();
}
- }
+ }
/**
* show:
// a null first argument.
let [bRed, bGreen, bBlue] = this._brightnessContrast.get_brightness();
this._brightnessContrast.set_enabled(
- cRed != NO_CHANGE || cGreen != NO_CHANGE || cBlue != NO_CHANGE ||
- bRed != NO_CHANGE || bGreen != NO_CHANGE || bBlue != NO_CHANGE
+ cRed != NO_CHANGE || cGreen != NO_CHANGE || cBlue != NO_CHANGE ||
+ bRed != NO_CHANGE || bGreen != NO_CHANGE || bBlue != NO_CHANGE
);
}
};
* Set the crosswire size of all ZoomRegions.
* @size: The thickness of each line in the cross wire.
*/
- setCrosswireSize(size) {
+ setCrosswireSize(size) {
Main.magnifier.setCrosshairsThickness(size);
- }
+ }
/**
* getCrosswireSize:
* Get the crosswire size of all ZoomRegions.
* @return: The thickness of each line in the cross wire.
*/
- getCrosswireSize() {
+ getCrosswireSize() {
return Main.magnifier.getCrosshairsThickness();
- }
+ }
/**
* setCrosswireLength:
* Set the crosswire length of all zoom-regions..
* @size: The length of each line in the cross wire.
*/
- setCrosswireLength(length) {
+ setCrosswireLength(length) {
Main.magnifier.setCrosshairsLength(length);
- }
+ }
/**
* setCrosswireSize:
* Set the crosswire size of all zoom-regions.
* @size: The thickness of each line in the cross wire.
*/
- getCrosswireLength() {
+ getCrosswireLength() {
return Main.magnifier.getCrosshairsLength();
- }
+ }
/**
* setCrosswireClip:
* Set if the crosswire will be clipped by the cursor image..
* @clip: Flag to indicate whether to clip the crosswire.
*/
- setCrosswireClip(clip) {
+ setCrosswireClip(clip) {
Main.magnifier.setCrosshairsClip(clip);
- }
+ }
/**
* getCrosswireClip:
* Get the crosswire clip value.
* @return: Whether the crosswire is clipped by the cursor image.
*/
- getCrosswireClip() {
+ getCrosswireClip() {
return Main.magnifier.getCrosshairsClip();
- }
+ }
/**
* setCrosswireColor:
* Set the crosswire color of all ZoomRegions.
* @color: Unsigned int of the form rrggbbaa.
*/
- setCrosswireColor(color) {
+ setCrosswireColor(color) {
Main.magnifier.setCrosshairsColor('#%08x'.format(color));
- }
+ }
/**
* getCrosswireClip:
* Get the crosswire color of all ZoomRegions.
* @return: The crosswire color as an unsigned int in the form rrggbbaa.
*/
- getCrosswireColor() {
+ getCrosswireColor() {
let colorString = Main.magnifier.getCrosshairsColor();
// Drop the leading '#'.
return parseInt(colorString.slice(1), 16);
- }
+ }
};
/**
}
if (findPos != -1) {
for (let i = 0; i < this._urls.length; i++)
- if (findPos >= this._urls[i].pos &&
- this._urls[i].pos + this._urls[i].url.length > findPos)
- return i;
+ if (findPos >= this._urls[i].pos &&
+ this._urls[i].pos + this._urls[i].url.length > findPos)
+ return i;
}
return -1;
}
x > this._notificationLeftMouseX - MOUSE_LEFT_ACTOR_THRESHOLD) {
this._notificationLeftMouseX = -1;
this._notificationLeftTimeoutId = Mainloop.timeout_add(LONGER_HIDE_TIMEOUT * 1000,
- this._onNotificationLeftTimeout.bind(this));
+ this._onNotificationLeftTimeout.bind(this));
GLib.Source.set_name_by_id(this._notificationLeftTimeoutId, '[gnome-shell] this._onNotificationLeftTimeout');
} else {
this._notificationLeftTimeoutId = 0;
this._osdLabels = [];
this._monitorLabels = null;
Main.layoutManager.connect('monitors-changed',
- this._reset.bind(this));
+ this._reset.bind(this));
this._reset();
}
time: FADE_TIME,
transition: 'easeOutQuad',
onComplete: () => {
- this._reset();
- Meta.enable_unredirect_for_display(global.display);
+ this._reset();
+ Meta.enable_unredirect_for_display(global.display);
}
});
return GLib.SOURCE_REMOVE;
constructor() {
this._osdWindows = [];
Main.layoutManager.connect('monitors-changed',
- this._monitorsChanged.bind(this));
+ this._monitorsChanged.bind(this));
this._monitorsChanged();
}
}
fadeInDesktop() {
- this._desktopFade.opacity = 0;
- this._desktopFade.show();
- Tweener.addTween(this._desktopFade,
- { opacity: 255,
- time: ANIMATION_TIME,
- transition: 'easeOutQuad' });
+ this._desktopFade.opacity = 0;
+ this._desktopFade.show();
+ Tweener.addTween(this._desktopFade,
+ { opacity: 255,
+ time: ANIMATION_TIME,
+ transition: 'easeOutQuad' });
}
fadeOutDesktop() {
x_expand: true, y_expand: true,
clip_to_allocation: true });
this._group = new St.BoxLayout({ name: 'overview-group',
- x_expand: true, y_expand: true });
+ x_expand: true, y_expand: true });
this.actor.add_actor(this._group);
this.actor.add_actor(this._dashSlider.actor);
}
let buttonBox = new St.Widget({ layout_manager: new Clutter.BinLayout(),
- x_expand: true,
- x_align: Clutter.ActorAlign.CENTER,
- y_align: Clutter.ActorAlign.CENTER });
+ x_expand: true,
+ x_align: Clutter.ActorAlign.CENTER,
+ y_align: Clutter.ActorAlign.CENTER });
this.actor.add_actor(buttonBox);
this._editButton = new St.Button({ label: _("Edit…"),
style_class: 'button',
let [x, y, mods] = global.get_pointer();
pieTimer.start(x, y, timeout);
if (type == Clutter.PointerA11yTimeoutType.GESTURE)
- global.display.set_cursor(Meta.Cursor.CROSSHAIR);
+ global.display.set_cursor(Meta.Cursor.CROSSHAIR);
});
manager.connect('ptr-a11y-timeout-stopped', (manager, device, type) => {
pieTimer.stop();
if (type == Clutter.PointerA11yTimeoutType.GESTURE)
- global.display.set_cursor(Meta.Cursor.DEFAULT);
+ global.display.set_cursor(Meta.Cursor.DEFAULT);
});
}
};
let i = 0;
while (i < items.length && position > 0) {
- if (items[i] != menuItem)
- position--;
- i++;
+ if (items[i] != menuItem)
+ position--;
+ i++;
}
if (i < items.length) {
- if (items[i] != menuItem)
- this.box.set_child_below_sibling(menuItem.actor, items[i].actor);
+ if (items[i] != menuItem)
+ this.box.set_child_below_sibling(menuItem.actor, items[i].actor);
} else {
- this.box.set_child_above_sibling(menuItem.actor, null);
+ this.box.set_child_above_sibling(menuItem.actor, null);
}
}
});
this._enableInternalCommands = global.settings.get_boolean('development-tools');
- this._internalCommands = { 'lg': () => {
- Main.createLookingGlass().open();
- },
+ this._internalCommands = {
+ 'lg': () => { Main.createLookingGlass().open(); },
- 'r': this._restart.bind(this),
+ 'r': this._restart.bind(this),
- // Developer brain backwards compatibility
- 'restart': this._restart.bind(this),
+ // Developer brain backwards compatibility
+ 'restart': this._restart.bind(this),
- 'debugexit': () => {
- Meta.quit(Meta.ExitCode.ERROR);
- },
+ 'debugexit': () => { Meta.quit(Meta.ExitCode.ERROR); },
- // rt is short for "reload theme"
- 'rt': () => {
- Main.reloadThemeResource();
- Main.loadTheme();
- },
-
- 'check_cloexec_fds': () => {
- Shell.util_check_cloexec_fds();
- },
- };
+ // rt is short for "reload theme"
+ 'rt': () => {
+ Main.reloadThemeResource();
+ Main.loadTheme();
+ },
+ 'check_cloexec_fds': () => {
+ Shell.util_check_cloexec_fds();
+ },
+ };
let label = new St.Label({ style_class: 'run-dialog-label',
text: _("Enter a Command") });
delay: unitaryDelay * (N_ARROWS - (i + 1)),
time: ARROW_ANIMATION_TIME,
transition(t, b, c, d) {
- if (t < d / 2)
- return TweenerEquations.easeOutQuad(t, 0, maxOpacity, d / 2);
- else
- return TweenerEquations.easeInQuad(t - d / 2, maxOpacity, -maxOpacity, d / 2);
+ if (t < d / 2)
+ return TweenerEquations.easeOutQuad(t, 0, maxOpacity, d / 2);
+ else
+ return TweenerEquations.easeInQuad(t - d / 2, maxOpacity, -maxOpacity, d / 2);
}
});
}
selectArea.connect('finished', (selectArea, areaRectangle) => {
if (areaRectangle) {
let retRectangle = this._unscaleArea(areaRectangle.x, areaRectangle.y,
- areaRectangle.width, areaRectangle.height);
+ areaRectangle.width, areaRectangle.height);
let retval = GLib.Variant.new('(iiii)', retRectangle);
invocation.return_value(retval);
} else {
invocation.return_error_literal(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED,
- "Operation was cancelled");
+ "Operation was cancelled");
}
});
}
});
} else {
invocation.return_error_literal(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED,
- "Operation was cancelled");
+ "Operation was cancelled");
}
});
}
this.menu.addMenuItem(highContrast);
let magnifier = this._buildItem(_("Zoom"), APPLICATIONS_SCHEMA,
- 'screen-magnifier-enabled');
+ 'screen-magnifier-enabled');
this.menu.addMenuItem(magnifier);
let textZoom = this._buildFontItem();
this.menu.addMenuItem(textZoom);
let screenReader = this._buildItem(_("Screen Reader"), APPLICATIONS_SCHEMA,
- 'screen-reader-enabled');
+ 'screen-reader-enabled');
this.menu.addMenuItem(screenReader);
let screenKeyboard = this._buildItem(_("Screen Keyboard"), APPLICATIONS_SCHEMA,
- 'screen-keyboard-enabled');
+ 'screen-keyboard-enabled');
this.menu.addMenuItem(screenKeyboard);
let visualBell = this._buildItem(_("Visual Alerts"), WM_SCHEMA, KEY_VISUAL_BELL);
this._managerProxy = proxy;
this._propertiesChangedId = this._managerProxy.connect('g-properties-changed',
- this._onGeocluePropsChanged.bind(this));
+ this._onGeocluePropsChanged.bind(this));
this._syncIndicator();
APP_PERMISSIONS_ID,
this._permissions,
data,
- (result, error) => {
- if (error != null)
- log(error.message);
- });
+ (result, error) => {
+ if (error != null)
+ log(error.message);
+ });
}
};
// The icon label
let label;
if (this._proxy.State == UPower.DeviceState.FULLY_CHARGED)
- label = _("%d\u2009%%").format(100);
+ label = _("%d\u2009%%").format(100);
else
- label = _("%d\u2009%%").format(this._proxy.Percentage);
+ label = _("%d\u2009%%").format(this._proxy.Percentage);
this._percentageLabel.clutter_text.set_markup('<span size="smaller">' + label + '</span>');
// The status label
this._item.menu.addAction(_("Turn off"),
() => {
for (let handle of this._handles)
- handle.stop();
+ handle.stop();
});
this._item.icon.icon_name = 'screen-shared-symbolic';
this.menu.addMenuItem(this._item);
}
enrollDevice(id, policy, callback) {
- this._proxy.EnrollDeviceRemote(id, policy, AuthCtrl.NONE,
- (res, error) => {
+ this._proxy.EnrollDeviceRemote(id, policy, AuthCtrl.NONE, (res, error) => {
if (error) {
Gio.DBusError.strip_remote_error(error);
callback(null, error);
time: POPUP_SCROLL_TIME,
transition: 'easeOutQuad',
onComplete: () => {
- if (this._highlighted == 0)
- this._scrollableLeft = false;
- this.queue_relayout();
+ if (this._highlighted == 0)
+ this._scrollableLeft = false;
+ this.queue_relayout();
}
- });
+ });
}
_scrollToRight() {
time: POPUP_SCROLL_TIME,
transition: 'easeOutQuad',
onComplete: () => {
- if (this._highlighted == this._items.length - 1)
- this._scrollableRight = false;
- this.queue_relayout();
- }
- });
+ if (this._highlighted == this._items.length - 1)
+ this._scrollableRight = false;
+ this.queue_relayout();
+ }
+ });
}
_itemActivated(n) {
if (this._entry.mapped) {
// Enable 'find-as-you-type'
this._capturedEventId = global.stage.connect('captured-event',
- this._onCapturedEvent.bind(this));
+ this._onCapturedEvent.bind(this));
this._text.set_cursor_visible(true);
this._text.set_selection(0, 0);
} else {
if (this._iconClickedId == 0)
this._iconClickedId = this._entry.connect('secondary-icon-clicked',
- this.reset.bind(this));
+ this.reset.bind(this));
} else {
if (this._iconClickedId > 0) {
this._entry.disconnect(this._iconClickedId);
this._windowDemandsAttentionId = global.display.connect('window-demands-attention',
this._onWindowDemandsAttention.bind(this));
this._windowMarkedUrgentId = global.display.connect('window-marked-urgent',
- this._onWindowDemandsAttention.bind(this));
+ this._onWindowDemandsAttention.bind(this));
}
_getTitleAndBanner(app, window) {
if (actor.meta_window.is_monitor_sized()) {
Tweener.addTween(actor,
- { opacity: 0,
- time: MINIMIZE_WINDOW_ANIMATION_TIME,
- transition: 'easeOutQuad',
- onComplete: this._minimizeWindowDone,
- onCompleteScope: this,
- onCompleteParams: [shellwm, actor],
- onOverwrite: this._minimizeWindowOverwritten,
- onOverwriteScope: this,
- onOverwriteParams: [shellwm, actor]
- });
+ { opacity: 0,
+ time: MINIMIZE_WINDOW_ANIMATION_TIME,
+ transition: 'easeOutQuad',
+ onComplete: this._minimizeWindowDone,
+ onCompleteScope: this,
+ onCompleteParams: [shellwm, actor],
+ onOverwrite: this._minimizeWindowOverwritten,
+ onOverwriteScope: this,
+ onOverwriteParams: [shellwm, actor]
+ });
} else {
let xDest, yDest, xScale, yScale;
let [success, geom] = actor.meta_window.get_icon_geometry();
actor.opacity = 0;
actor.set_scale(1.0, 1.0);
Tweener.addTween(actor,
- { opacity: 255,
- time: MINIMIZE_WINDOW_ANIMATION_TIME,
- transition: 'easeOutQuad',
- onComplete: this._unminimizeWindowDone,
- onCompleteScope: this,
- onCompleteParams: [shellwm, actor],
- onOverwrite: this._unminimizeWindowOverwritten,
- onOverwriteScope: this,
- onOverwriteParams: [shellwm, actor]
- });
+ { opacity: 255,
+ time: MINIMIZE_WINDOW_ANIMATION_TIME,
+ transition: 'easeOutQuad',
+ onComplete: this._unminimizeWindowDone,
+ onCompleteScope: this,
+ onCompleteParams: [shellwm, actor],
+ onOverwrite: this._unminimizeWindowOverwritten,
+ onOverwriteScope: this,
+ onOverwriteParams: [shellwm, actor]
+ });
} else {
let [success, geom] = actor.meta_window.get_icon_geometry();
if (success) {
if (window.is_always_on_all_workspaces() ||
(Meta.prefs_get_workspaces_only_on_primary() &&
window.get_monitor() != Main.layoutManager.primaryIndex))
- return;
+ return;
}
if (target == 'last') {
return;
if (overlay && overlay._hidden)
- overlay.show();
+ overlay.show();
}
_delayedWindowRepositioning() {
// Position and scale the windows.
for (let i = 0; i < this._windows.length; i++)
- this._zoomWindowFromOverview(i);
+ this._zoomWindowFromOverview(i);
}
_zoomWindowFromOverview(index) {
this._childWidth = 0;
this.connect('style-changed', () => {
- this._itemSpacing = this.get_theme_node().get_length('spacing');
+ this._itemSpacing = this.get_theme_node().get_length('spacing');
});
}
for (let i = 0; i < workspaceManager.n_workspaces; i++) {
let indicator = null;
- if (i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.UP)
- indicator = new St.Bin({ style_class: 'ws-switcher-active-up' });
- else if (i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.DOWN)
- indicator = new St.Bin({ style_class: 'ws-switcher-active-down' });
- else
- indicator = new St.Bin({ style_class: 'ws-switcher-box' });
+ if (i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.UP)
+ indicator = new St.Bin({ style_class: 'ws-switcher-active-up' });
+ else if (i == this._activeWorkspaceIndex && this._direction == Meta.MotionDirection.DOWN)
+ indicator = new St.Bin({ style_class: 'ws-switcher-active-down' });
+ else
+ indicator = new St.Bin({ style_class: 'ws-switcher-box' });
- this._list.add_actor(indicator);
+ this._list.add_actor(indicator);
}
// Track window changes
this._windowAddedId = this.metaWorkspace.connect('window-added',
- this._windowAdded.bind(this));
+ this._windowAdded.bind(this));
this._windowRemovedId = this.metaWorkspace.connect('window-removed',
this._windowRemoved.bind(this));
this._windowEnteredMonitorId = global.display.connect('window-entered-monitor',
destroy() {
if (this.actor)
- this.actor.destroy();
+ this.actor.destroy();
}
workspaceRemoved() {
this.workspaceRemoved();
if (this._bgManager) {
- this._bgManager.destroy();
- this._bgManager = null;
+ this._bgManager.destroy();
+ this._bgManager = null;
}
this._windows = [];
_onEnter() {
this._windowGroupVisibilityHandlerId =
- global.window_group.connect('notify::visible',
- this._onWindowGroupVisibilityChanged.bind(this));
+ global.window_group.connect('notify::visible',
+ this._onWindowGroupVisibilityChanged.bind(this));
this.emit('drag-begin', global.get_current_time());
}
// Make sure that the cursor window is on top
if (this._cursorWindowClone)
- this._cursorWindowClone.raise_top();
+ this._cursorWindowClone.raise_top();
let dragEvent = {
x: x,
}
while (pickedActor) {
- if (pickedActor._delegate && pickedActor._delegate.handleDragOver) {
- let [r, targX, targY] = pickedActor.transform_stage_point(x, y);
- let result = pickedActor._delegate.handleDragOver(this,
- dragEvent.dragActor,
- targX,
- targY,
- global.get_current_time());
- if (result != DND.DragMotionResult.CONTINUE)
- return;
- }
- pickedActor = pickedActor.get_parent();
+ if (pickedActor._delegate && pickedActor._delegate.handleDragOver) {
+ let [r, targX, targY] = pickedActor.transform_stage_point(x, y);
+ let result = pickedActor._delegate.handleDragOver(this,
+ dragEvent.dragActor,
+ targX,
+ targY,
+ global.get_current_time());
+ if (result != DND.DragMotionResult.CONTINUE)
+ return;
+ }
+ pickedActor = pickedActor.get_parent();
}
}
};
JsUnit.assertNotEquals("Code '" + base + "' is valid code", e.constructor, SyntaxError);
}
}
- }
- }
+ }
+ }
}
let propertyNames = Object.getOwnPropertyNames(obj);
JsUnit.assertEquals("The context '" + JSON.stringify(obj) + "' was not modified", propertyNames.length, 0);